package com.zfl.thread.day05;

import java.util.concurrent.CompletableFuture;

public class CompletableFutureDemo03 {
    public static void main(String[] args) {
        CompletableFuture.supplyAsync(()->{
          return 10;
        }).thenCombine(CompletableFuture.supplyAsync(()->{
            return 20;
        }),(v1,v2)->{
            System.out.println(v1+v2);
            return v1+v2;
        });
    }
}
